<?php 
session_start();

$page= basename($_SERVER['PHP_SELF']);
$add=0;
$edit=0;
$del=0;
 
if ($_SESSION['permission'][$page]['v']!="1") {
	echo "<meta http-equiv = refresh ; content = '0 ; url = index.php'>";
	 
	exit();
}else {

	$add = $_SESSION['permission'][$page]['a']?1:0;
	$edit = $_SESSION['permission'][$page]['e']?1:0;
	$del = $_SESSION['permission'][$page]['d']?1:0;
	 
}


?>
<script>
	var _dd = <?php echo $add;?>;
	var _it = <?php echo $edit;?>;
	var _te = <?php echo $del;?>;
</script>